<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/5/27
  Time: 15:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8"/>
    <title>最家</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/mygxin.css"/>
    <script src="js/jquery-1.12.4.min.js"></script>
</head>
<body><!------------------------------head------------------------------>
<%@ include file="header1.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!------------------------------idea------------------------------>
<div class="address mt">
    <div class="wrapper clearfix"><a href="indexselect" class="fl">首页</a><span>/</span><a
            href="mygxinselect">个人中心</a><span>/</span><a href="addressselect" class="on">地址管理</a></div>
</div><!------------------------------Bott------------------------------>
<div class="Bott">
    <div class="wrapper clearfix">
        <div class="zuo fl">
            <h3><a href="#"><img width="80px" height="80px" src="image/headerphoto/${hp.user_filename}"/></a>${name.user_id}
                <p class="clearfix"><span class="fl">[${name.user_name}]</span><span class="fr"><a href="/lyq/admin/logout">[退出登录]</a></span></p></h3>
            <div><h4>我的交易</h4>
                <ul>
                    <li><a href="showcart">我的购物车</a></li>
                    <li><a href="myorderqselect">我的订单</a></li>
                    <li><a href="myprodselect">评价晒单</a></li>
                </ul>
                <h4>个人中心</h4>
                <ul>
                    <li><a href="mygxinselect">我的中心</a></li>
                    <li class="on"><a href="addressselect">地址管理</a></li>
                </ul>
                <h4>账户管理</h4>
                <ul>
                    <li><a href="mygrxxselect">个人信息</a></li>
                    <li><a href="remimaselect">修改密码</a></li>
                </ul>
            </div>
        </div>
        <div class="you fl"><h2>收货地址</h2>
            <div class="add">
                <div ><a href="#2" id="addxad"><img src="img/jia.png"/></a><span>添加新地址</span></div>
            </div>
            <c:forEach items="${alist}" var="al">
            <div class="add">
                    <div>
                        <p>${al.user_name}</p>
                        <p>${al.user_mobile}</p>
                        <p>${al.user_address}</p>
                        <p><a class="readda" href="addressselect?id=${al.id}" style="color: red;width: 30px;margin-top: 20px;margin-right: 50px">修改</a><a href="deletedr?id=${al.id}&flag=1" style="color: red;width: 30px;margin-top: -13px;margin-left: 50px">删除</a></p>
                    </div>
            </div>
            </c:forEach>
<%--            id="readd"--%>
        </div>
    </div>
</div><!--编辑弹框--><!--遮罩-->
<div class="mask"></div>
<div class="adddz">
    <form action="doaddressadd" method="post">
        <input type="text" name="name" placeholder="姓名" class="on"/>
        <input type="hidden" name="id" value="${name.user_id}">
        <input type="text" name="mb" placeholder="手机号"/>
        <textarea name="ar" rows="" cols="" placeholder="详细地址"></textarea>
        <div class="bc"><input type="submit" value="保存"/><input type="button" value="取消"/></div>
    </form>
</div>
<div class="readd">
    <form action="doaddressupdate" method="post">
        <input type="hidden" name="userid" value="${are.user_id}">
        <input type="hidden" name="name1" value="${are.user_name}">
        <input type="text" name="name" class="on" value="${are.user_name}"/>
        <input type="text" name="userp" value="${are.user_mobile}"/>
        <textarea name="useraddress" rows="" cols="" placeholder="详细地址">${are.user_address}</textarea>
        <div class="bc"><input type="submit" value="保存"/><input type="button" value="取消"/></div>
    </form>
</div><!--返回顶部-->
<script>
    var url = window.location.href;
    var result = url.split("?")[1];
    var val = result.split("&");
    var len = val.length;
    for(var i=0; i<len; i++) {
        if(val[i].split("=")[0] === "id") {
            $(".mask").show();
            $(".readd").show();
        }
    }
</script>
<div class="gotop"><a href="showcart">
    <dl>
        <dt><img src="img/gt1.png"/></dt>
        <dd>去购<br/>物车</dd>
    </dl>
</a><a href="#" class="dh">
    <dl>
        <dt><img src="img/gt2.png"/></dt>
        <dd>联系<br/>客服</dd>
    </dl>
</a><a href="mygxinselect">
    <dl>
        <dt><img src="img/gt3.png"/></dt>
        <dd>个人<br/>中心</dd>
    </dl>
</a><a href="#" class="toptop" style="display: none">
    <dl>
        <dt><img src="img/gt4.png"/></dt>
        <dd>返回<br/>顶部</dd>
    </dl>
</a>
    <p>400-800-8200</p></div><!--footer-->
<div class="footer">
    <div class="top">
        <div class="wrapper">
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot1.png"/></a><span class="fl">7天无理由退货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot2.png"/></a><span class="fl">15天免费换货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot3.png"/></a><span class="fl">满599包邮</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot4.png"/></a><span class="fl">手机特色服务</span>
            </div>
        </div>
    </div>
    <p class="dibu">最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br/>
        违法和不良信息举报电话：400-800-8200，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p></div>
<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>